#define _CRT_SECURE_NO_WARNINGS 1
#include <iostream>
#include <string>
#include <vector>
using namespace std;

//https://www.nowcoder.com/practice/f094aed769d84cf3b799033c82fc1bf6?tpId=182&tqId=34710&ru=/exam/oj

class StringFormat {
public:
    string formatString(string str, int n, vector<char> arg, int m)
    {
        string ret;
        int j = 0;
        for (int i = 0; i < n; i++)
        {
            if (str[i] == '%')
            {
                ret += arg[j];
                j++, i++;
            }
            else
                ret += str[i];

        }

        while (j < m)
        {
            ret += arg[j];
            j++;
        }

        return ret;
    }
};


int main()
{
    return 0;
}